﻿using System.Web.Mvc;
using SmallBusinessKit.Interfaces;
using SmallBusinessKit.ViewModels;

namespace SmallBusinessKit.Controllers
{
    public class TestimonialsController : BaseController
    {
        #region Properties

        private readonly ITestimonialDomain _testimonialDomain;

        #endregion

        public TestimonialsController(ITestimonialDomain testimonialDomain)
        {
            _testimonialDomain = testimonialDomain;
        }

        [Route("Testimonials")]
        public ViewResult Index()
        {
            var viewModel = new TestimonialsViewModel
            {
                Items = _testimonialDomain.GetAllTestimonials()
            };

            return View(viewModel);
        }
    }
}